using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Web;
using System.Web.Configuration;

namespace TanashCMS.Business.Task
{
    public class TimeZoneTask
    {
        public static DateTime ToLocal(int DifferenceFromGMT, DateTime time)
        {
            int utcOffset = (int)TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).TotalHours;
            DifferenceFromGMT -= utcOffset;

            return time.AddHours(DifferenceFromGMT);
        }
    }
}
